package com.xc.h05.service.changlongfei.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xc.h05.entity.CoursemarkCLFV;
import com.xc.h05.mapper.CoursemarkMapper;
import com.xc.h05.service.changlongfei.VCoursemarkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VCoursemarkServiceImpl implements VCoursemarkService {
    @Autowired
    CoursemarkMapper coursemarkMapper;
    @Override
    public PageInfo<CoursemarkCLFV> getCoursemarkByPage(int pageNum, int pageSize ,CoursemarkCLFV coursemarkclfv) {
        PageHelper.startPage(pageNum, pageSize);
        List<CoursemarkCLFV> coursemarkCLFVS = coursemarkMapper.selectCoursemark(coursemarkclfv);
        PageInfo<CoursemarkCLFV> pageInfo = new PageInfo<>(coursemarkCLFVS);
        return pageInfo;
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return coursemarkMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int deleteCoursemarkBatch(Long[] ids) {
        return coursemarkMapper.deleteCoursemarkBatch(ids);
    }
}
